package com.a01_2021.thousandstimes.general.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDate;

/**
 * <p>
 *
 * </p>
 *
 * @author FRQ
 * @since 2021-02-22
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
public class Experience extends Model<Experience> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableId("user_id")
    private Long userId;

    private String evaluator;

    private String comment;

    private String company;

    @TableId("start_date")
    private LocalDate startDate;

    @TableId("end_date")
    private LocalDate endDate;

    @TableId("post_id")
    private int postId;

    @TableId("position_id")
    private long positionId;

    @TableId("title")
    private String title;

    @TableId("instance_id")
    private long instanceId;

    private double score;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
